{% extends "mock/base.html" %}
{% block title%}<title>响应列表</title>{% endblock %}

{% block content %}
    <div class="container theme-showcase" role="main">

      <!--查询-->
      <div class="page-header" style="margin-top: 80px;">
        <div id="navbar" class="navbar-collapse collapse" style="float:left;">
          <form class="navbar-form" method="get" action="/search/">
            <div class="form-group">
              <input name="response_name" type="text" placeholder="name" class="form-control" >
            </div>
            <button type="submit" class="btn btn-success" >搜索</button>
          </form>
        </div><!--/.navbar-collapse -->
        <div style="float:right;">
          <button type="submit" class="btn btn-primary" onclick="window.location.href='{% url 'add_response' %}'" style="margin-top: 8px;">添加</button>
        </div>
      </div>

      <!--表单-->
      <div class="row" >
        <div class="col-md-6" style="width: 900px;">
          <table class="table table-striped">
            <thead>
              <tr>
                <th>name</th>
                <th>json_result</th>
                <th>delay</th>
                <th>router</th>

              </tr>
            </thead>
            <tbody>
                {% for reponse in all_reponse %}
                    <tr>
                      <td>{{ reponse.name }}</td>
                      <td>{{ reponse.json_result }}</td>
                      <td>{{ reponse.delay }}</td>
                      <td>{{ reponse.router }}</td>
                      <td><a href="{% url "editresponse" reponse.id %}" >编辑</a></td>
                      <td><a href="{% url "delresponse" reponse.id %}">删除</a></td>
                </tr>
                {% endfor %}
            </tbody>
          </table>
        </div>

      </div>
</div>



{% endblock %}